package com.ldx.mybatisplusdemo.Mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.ldx.mybatisplusdemo.model.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
//根据实体类的名称推断表名
public interface UserInfoMapper extends BaseMapper<UserInfo> {
    @Select("select id,username,password,age from user_info ${ew.customSqlSegment}")
    List<UserInfo> mySelect(@Param(Constants.WRAPPER)
                            Wrapper<UserInfo> wrapper);
    List<UserInfo> mySelect2(@Param(Constants.WRAPPER)
                             Wrapper<UserInfo> wrapper);
}
